package com.mjk.common.core.jdbc.service.plus.idbservice;



import com.mjk.common.base.model.BaseEntity;
import com.mjk.common.base.model.BaseExample;
import com.mjk.common.core.jdbc.bean.BeePage;

import java.util.List;
import java.util.Map;

public interface BaseDBService<T extends BaseEntity, K extends BaseExample>{
    Integer countByExample(K paramK);

    List<T> getAll(T paramT);

    List<T> findManyByExample(K paramK);
    
    T findOneByExample(K paramK);
    
    BeePage<T> findManyByExampleWithPage(K example);
    
    T findOne(T paramT);

    void save(T paramT);
    
   
    /**
     * 该方法主要为mysql返回主键值 带Id
     */
    Integer insert(T paramT);
    
    Integer update(T paramT);
    
    Integer update(T paramT, K paramK);
    
    void save(List<T> paramList);

    void update(List<T> paramList);

    Integer delete(T paramT);
    
    Integer delete(K exK);

    void delete(List<T> paramList);

    List<Map<String,Object>> excuteSql(Map<String, Object> paramString);
    
    List<Map<String,Object>> excuteSql(String paramString);
}
